<?php 
require 'header.php';
include("connect.php");

?>
<div class="container" style="margin-top: 30px;">
	<div class="card border border-success">
	  <div class="card-body">
	    <h5 class="card-title">书籍列表</h5>
	   <div class="row">
	   <?php
	   				$sql="select * from bookinfo order by Id DESC";
	   					$result=mysqli_query($conn,$sql);
	   					while($data=mysqli_fetch_array($result))
	   		{
	   		?>
	   	<div class="card border border-primary" style="width: 18rem;  margin: 20px ;">
	   		<div class="card-body" >
	   			<h5 class="card-title">《<?php echo $data['bookname']?>》</h5>
	   			<h7 class="card-subtitle mb-2 text-muted">分类：<?php echo $data['classify']?></h7>
	   			<p class="card-text" style="display: inline-block;white-space: nowrap;width: 100%;overflow: hidden;
				   text-overflow:ellipsis;" ><?php echo $data['article']?></p>
	   			<a href="more.php?id=<?php echo $data['id']?>" target="_blank" class="card-link">查看更多</a>
	   		</div>
	   	</div>
	      <?php
	   		}
	   			?>
	               </div>
	    <p class="card-text"><small class="text-muted">期待您的分享</small></p>
	  </div>
	</div>

</div>
